package com.nbcb.service.impl;

import com.nbcb.dao.ProductDao;
import com.nbcb.domain.Product;
import com.nbcb.service.ProductService;

/**
 * 商品逻辑实现
 */
public class ProductServiceImpl implements ProductService {
    ProductDao productDao;

    @Override
    public Boolean productState(String id) {
      Product product = productDao.selectById(id);
      if(product != null){
          product.setState("上架");
          productDao.update(product);
      }else {
          return false;
      }
        return true;
    }
}
